<template>
	<h-dark></h-dark>
	<view class="bg-[#4E55AF] px-[30rpx] pb-[30rpx] pt-[10rpx]">
		<view class="mb-[30rpx]">
			<view class="text-2xl font-bold leading-normal">{{data.title}}</view>
		</view>
		<view class="">
			{{data.time}}
		</view>
	</view>
	<view class="px-[24rpx] py-[20rpx]">

		<view class="">
			<view class="leading-loose" v-html="data.content">
			</view>
		</view>
	</view>
</template>

<script lang="ts" setup>
	import { ref } from 'vue'
	import { onLoad } from '@dcloudio/uni-app'
	import { getUserNoticeDetail } from '@/api/user'
	
	const data = ref<any>({})

	const getData = async (id:number) => {
		const res = await getUserNoticeDetail({ id })
		data.value = res.data
	}

	onLoad((options : any) => {
		getData(options.id)
	})
</script>

<style lang="scss">
</style>